cmake_minimum_required(VERSION 3.8)
project(face_recognition)

# 设置C++标准
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 查找dlib库
find_package(dlib REQUIRED)

# 包含头文件目录
include_directories(
    ${CMAKE_SOURCE_DIR}/include
    ${dlib_INCLUDE_DIRS}
)

# 添加可执行文件
add_executable(image_to_vector 
    src/image_to_vector.cpp
)
target_link_libraries(image_to_vector 
    dlib::dlib
)

add_executable(face_cmp 
    src/face_cmp.cpp
)
target_link_libraries(face_cmp 
    dlib::dlib
)

add_executable(build_face_lib 
    src/build_face_lib.cpp
)
target_link_libraries(build_face_lib 
    dlib::dlib
)

add_executable(face_recognition 
    src/face_recognition.cpp
)
target_link_libraries(face_recognition 
    dlib::dlib
)

# 复制模型文件到构建目录
file(COPY models/ DESTINATION ${CMAKE_BINARY_DIR}/models)

# 复制测试图片到构建目录
file(COPY face_images/ DESTINATION ${CMAKE_BINARY_DIR}/face_images)
file(COPY testimg/ DESTINATION ${CMAKE_BINARY_DIR}/testimg)